<?php

declare(strict_types=1);

namespace App\CustHub\Request;

use Mine\MineFormRequest;

class WordRequest extends MineFormRequest
{
    public function addRules(): array
    {
        return [
            'title' => 'required',
            'keyword' => 'required',
            'match_type' => 'in:0,1',
            'content' => 'required',
            'is_personal' => 'required',
            'cs_id' => 'required_if:is_personal,1',
        ];
    }

    public function editRules(): array
    {
        return array_merge(['id' => 'required'], $this->addRules());
    }

    public function copyRules():array
    {
        return [
            'id' => 'required'
        ];
    }
}